package com.zhoug.push.core;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

/**
 * 统一消息对象
 * @description: 类的简要描述
 * @author: 35574
 * @date: 2025/11/4 10:20
 */
public class PushMessage implements Parcelable {
    private String id;//消息id
    private String title;//消息标题
    private String content;//消息内容
    private String vendor;//消息来源厂商

    public PushMessage() {
    }


    protected PushMessage(Parcel in) {
        id = in.readString();
        title = in.readString();
        content = in.readString();
        vendor = in.readString();
    }



    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }


    public String getVendor() {
        return vendor;
    }

    public void setVendor(String vendor) {
        this.vendor = vendor;
    }



    @Override
    public int describeContents() {
        return 0;
    }


    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(title);
        dest.writeString(content);
        dest.writeString(vendor);
    }

    public static final Creator<PushMessage> CREATOR = new Creator<PushMessage>() {
        @Override
        public PushMessage createFromParcel(Parcel in) {
            return new PushMessage(in);
        }

        @Override
        public PushMessage[] newArray(int size) {
            return new PushMessage[size];
        }
    };

}
